package com.weds.edpf.core.mapper;

import com.weds.core.annotation.MyBatisDao;
import com.weds.edpf.core.entity.NDeviceMonitorEntity;
import java.util.List;
import org.apache.ibatis.annotations.Param;

/**
 * @Author
 * @Description 管理
 * @Date 2020-06-12
 */
@MyBatisDao
public interface NDeviceMonitorMapper {
    /**
     */
    int deleteByPrimaryKey(Integer xh);

    /**
     */
    int insert(NDeviceMonitorEntity record);

    /**
     */
    int insertBatch(@Param("list") List<NDeviceMonitorEntity> list);

    /**
     */
    int insertSelective(NDeviceMonitorEntity record);

    /**
     */
    NDeviceMonitorEntity selectByPrimaryKey(Integer xh);

    /**
     */
    int updateByPrimaryKeySelective(NDeviceMonitorEntity record);

    /**
     */
    int updateByPrimaryKey(NDeviceMonitorEntity record);

    /**
     */
    List<NDeviceMonitorEntity> selectListByEntity(NDeviceMonitorEntity record);

    /**
     */
    int deleteBatchByKeys(@Param("list") List<NDeviceMonitorEntity> list);

    /**
     * 统计 在线/离线设备
     * @param list
     * @param onlineState
     * @return
     */
    int countOnlineOrDev(@Param("list") List<Integer> list, @Param("onlineState") Integer onlineState);

    /**
     * 未上传记录
     * @param list
     * @return
     */
    int countUpdate(@Param("list") List<Integer> list);

    /**
     * 剩余档案
     * @param list
     * @return
     */
    int countDownData(@Param("list") List<Integer> list);

    /**
     * 设备实时监控列表
     */
    List<NDeviceMonitorEntity> monitorList(@Param("list") List<Integer> list);

}